#include<stdio.h>
typedef struct
{
	char name[26];
	char id[26];
	int score[5];
	double average;
	int total;
}STU;
int main()
{
	int n;
	scanf("%d",&n);
	STU student[n];
	STU *p[n];
	for(int i=0;i<n;i++)
	{
		p[i]=&student[i];
		getchar();
		gets(p[i]->name); 
		scanf("%s",p[i]->id);
		p[i]->total=0;
		p[i]->average=0.0;
		for(int j=0;j<5;j++)
		{
			scanf("%d",&(p[i]->score[j]));
			(p[i]->total)+=(p[i]->score[j]); 
		}
		(p[i]->average)=((p[i]->total)/5.0);
	}
	for(int i=0;i<n;i++)
	{
		printf("Name:%s\nID:%s\nScore:%d %d %d %d %d\naverage:%.2lf total:%d\n\n",student[i].name,student[i].id,student[i].score[0],student[i].score[1],student[i].score[2],student[i].score[3],student[i].score[4],student[i].average,student[i].total);
	}
	return 0;
}
